<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/commons/include/html_doctype.html" %>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<%@include file="/commons/page/codegen.jsp" %>
		<script type="text/javascript" src="${ctx}/js/gpoint/rdp/permissionPid/doorPermissionPid.js"></script>
		<title>身份授权表管理列表</title>
	</head>
	<body>
		<div class="wrapper wrapper-content  animated fadeInRight col-sm-12">
			<div  class="toolbar-panel ">
				<div class="toolbar-box">
					<div class="toolbar-head clearfix">
						<!-- 顶部按钮 -->
						<div class="buttons"> 		
							<a class="btn btn-primary fa fa-search" href="javascript:void(0);" ><span>搜索</span></a>
							<%-- <a class="btn btn-primary fa fa-add"   href="${ctx}/rdp/permissionPid/doorPermissionPid/edit.htm" ><span>添加</span></a>
					        <a class="btn btn-primary fa fa-edit"   href="javascript:void(0);"  action="${ctx}/rdp/permissionPid/doorPermissionPid/edit.htm" ><span>编辑</span></a>	 
					        <a class="btn btn-primary fa fa-remove" href="javascript:void(0);"  action="${ctx}/rdp/permissionPid/doorPermissionPid/remove.htm"><span>删除</span></a> --%>
						 <a class="btn btn-primary fa fa-search" href="javascript:void(0);"  onclick="openDialog()"><span>授权</span></a>
						   <a class="btn btn-primary fa " href="javascript:void(0);" onclick="quxiao()"    ><span>取消</span></a>
						</div>
						<!-- 收缩 -->
						<div class="tools">
							<a href="javascript:void(0);" class="collapse">
								<i class="bigger-180 fa  fa-angle-double-up"></i>
							</a>
						</div>
					</div>
					<!-- #查询条件-->
					<div class="toolbar-body" >
						<form role="form" class="search-form">
							<div  class="form-inline p-xxs">
								<!-- <div class="form-group">
									<label   class="search-label">服务商代码</label>:
									<input type="text"  name="Q^SERVICECODE^SL"  class="form-control"  />
								</div>  -->
								<div class="form-group">
									<label   class="search-label">身份ID号</label>:
									<input type="text"  name="Q^PID^SL"  class="form-control"  />
								</div> 
								<div class="form-group">
									<label   class="search-label">身份名称</label>:
									<input type="text"  name="Q^PIDNMAME^SL"  class="form-control"  />
								</div> 
								<div class="form-group">
									<label   class="search-label">控制器名称</label>:
									<input type="text"  name="Q^CONTROLLERNO^SL"  class="form-control"  />
								</div> 
								
									<div class="form-group">
									<label   class="search-label">门名称</label>:
									<input type="text"  name="Q^DOORNAME^SL"  class="form-control"  />
								  </div>
							<!-- 	<div class="form-group">
									<label   class="search-label">门编号</label>:
									<input type="text"  name="Q^DOORNO^SL"  class="form-control"  />
								</div>  -->
								 <div class="form-group">
								<!-- 	<label   class="search-label">是否取消(0:未取消   2：已取消)</label>: -->
									<label   class="search-label">是否授权</label>:
								<!-- 	<input type="text"  name="Q^DELETEFLAG^SL"  class="form-control"  /> -->
									<select  id="slt" name="Q^DELETEFLAG^S" class="form-control" style="width:210px;" >
									     <option value="">全部</option>
									     <option value="0">已授权</option>
									     <option value="2">已取消</option>
									     </select>
								</div>  
								<!-- <div class="form-group">
									<label class="search-label">分配时间 </label>:
									<input type="text" name="Q^ALLOCATEDTIME^DL"  class="form-control date"  />
								</div> -->
								
								<label class="search-label">分配时间 </label>:
							     <div class="form-group">
									<div class="input-icon" >
									<i class="fa fa-calendar"></i>
									<input type="text" readonly="readonly" class="fr-form-control datepicker" datefmt="yyyy-MM-dd HH:mm:ss"   name="Q^ALLOCATEDTIME^DL"     pattern="yyyy-MM-dd HH:mm:ss"/>
								   </div>
								  		
								</div> 
							   <label class="search-label">至 </label>:
							     <div class="form-group">
									<div class="input-icon" >
									<i class="fa fa-calendar"></i>
									<input type="text" readonly="readonly" class="fr-form-control datepicker" datefmt="yyyy-MM-dd HH:mm:ss"   name="Q^ALLOCATEDTIME^DG"     pattern="yyyy-MM-dd HH:mm:ss"/>
								   </div>
								  		
								</div> 
						  	
						  	
								<!-- <div class="form-group">
									<label class="search-label" >至</label>:
									<input type="text" name="Q^ALLOCATEDTIME^DG"  class="form-control date" />
								</div>
								<div class="form-group">
									<label   class="search-label">EXT1</label>:
									<input type="text"  name="Q^EXT1^SL"  class="form-control"  />
								</div> 
								<div class="form-group">
									<label   class="search-label">EXT2</label>:
									<input type="text"  name="Q^EXT2^SL"  class="form-control"  />
								</div> 
								<div class="form-group">
									<label   class="search-label">EXT3</label>:
									<input type="text"  name="Q^EXT3^SL"  class="form-control"  />
								</div> 
								<div class="form-group">
									<label   class="search-label">EXT4</label>:
									<input type="text"  name="Q^EXT4^SL"  class="form-control"  />
								</div> 
								<div class="form-group">
									<label   class="search-label">EXT5</label>:
									<input type="text"  name="Q^EXT5^SL"  class="form-control"  />
								</div> 
								<div class="form-group">
									<label   class="search-label">EXT6</label>:
									<input type="text"  name="Q^EXT6^SL"  class="form-control"  />
								</div> 
								<div class="form-group">
									<label   class="search-label">IP_</label>:
									<input type="text"  name="Q^IP_^SL"  class="form-control"  />
								</div> 
								<div class="form-group">
									<label   class="search-label">CREATE_BY_</label>:
									<input type="text"  name="Q^CREATE_BY_^SL"  class="form-control"  />
								</div> 
								<div class="form-group">
									<label class="search-label">CREATE_TIME_ </label>:
									<input type="text" name="Q^CREATE_TIME_^DL"  class="form-control date"  />
								</div>
								<div class="form-group">
									<label class="search-label" >至</label>:
									<input type="text" name="Q^CREATE_TIME_^DG"  class="form-control date" />
								</div>
								<div class="form-group">
									<label   class="search-label">UPDATE_BY_</label>:
									<input type="text"  name="Q^UPDATE_BY_^SL"  class="form-control"  />
								</div> 
								<div class="form-group">
									<label class="search-label">UPDATE_TIME_ </label>:
									<input type="text" name="Q^UPDATE_TIME_^DL"  class="form-control date"  />
								</div>
								<div class="form-group">
									<label class="search-label" >至</label>:
									<input type="text" name="Q^UPDATE_TIME_^DG"  class="form-control date" />
								</div> -->
							</div>
						</form>
					</div><!--/ 查询条件-->
				</div>
			</div><!--/ 操作、查询-->
			<div class="jqGrid_wrapper">
				<table id="doorPermissionPidGrid" ></table>
				<div id="doorPermissionPidPager"></div>
			</div>
		</div>
	<script type="text/javascript">
	 function openDialog(){
	    	
		   
		   //弹框身份授权操作
		 DialogUtil.dialog(
				 {
		 				title : "身份授权操作",
		 				content : '${ctx}/rdp/zone/doorZone/listPidAuth.htm',
		 				area : [ '1100px', '800px' ],
		 				maxmin : false,
		 				end : function() {
		 					$("#doorPermissionPidGrid").trigger("reloadGrid");
						}
		 			
		 		}
		 );
		   
		   
		   
	   }
	 
	 
	 
	 
	 function quxiao(){
		// alert("取消权限执行");
		 var ids = jQuery("#doorPermissionPidGrid").jqGrid('getGridParam','selarrrow');
	       if(ids.length <0){
	    	   DialogUtil.confirm("请至少选择一个选项");
	    	   return;
	       }
	     /*   var rowData= jQuery("#currentPermissionGrid").jqGrid("getRowData",ids[0]);
	        
		
		 //获取数值
		 console.log(rowData);
		 */
		  
		  //var  type=ids[0];
		    var type=ids; 
		 
		    if(null !=ids && ''!=ids){
		    	 DialogUtil.confirm('' + '是否继续执行取消操作',
							function(rtn) {
							if(rtn)
								window.location.href = "${ctx}/rdp/permissionPid/doorPermissionPid/edit2.htm?id="+ids;
							else{
								
							}
								
							});
		    }else{
		    	alert("请选择ID");
		    }
		 
	 }
	</script>
	</body>
	
</html>